import { getToken } from "@/util/tokenStorage";
import { getUserAuth } from "@/util/userInfoStorage";

/**
 * 判断是否登陆
 * @return {boolean}
 */
export const judgeLogin = () => {
  const token = getToken();
  return (token) ? true : false;
};

/**
 * 判断是否为管理员权限
 * @return {boolean}
 */
export const judgeAdminAuth = () => {
  const role = getUserAuth();
  return (role == 'admin') ? true : false;
}